#pragma once

typedef int msgID;

class CBase;
class CPlayer;
class CPistolBullet;
class CShotgunBullet;
class CRocketLauncherBullet;
class CTurret;
class CDrop;
class CSpider;
class CGrenade;
class Firewall;

enum msgTypes {MSG_NULL, MSG_CREATE_PLAYER_BULLET, MSG_DESTROY_PLAYER_BULLET, 
	MSG_CREATE_SHOTGUN_BULLET, MSG_DESTROY_SHOTGUN_BULLET, 
	MSG_CREATE_ROCKET_BULLET, MSG_DESTROY_ROCKET_BULLET, 
	MSG_CREATE_EXGRENADE, MSG_CREATE_FWGRENADE, MSG_DESTROY_GRENADE,
	MSG_CREATE_TURRET, MSG_DESTROY_TURRET, 
	MSG_CREATE_SPIDER, MSG_DESTROY_SPIDER,
	MSG_CREATE_PISTOL_DROP, MSG_CREATE_SHOTGUN_DROP, MSG_CREATE_ROCKET_DROP, 
	MSG_CREATE_HEALTH_DROP, MSG_CREATE_EXGRENADE_DROP, MSG_DESTROY_DROP, 
	MSG_DESTROY_FIREWALL,MSG_CREATE_FWGRENADE_DROP,
	MSG_CREATE_SPEED_UPGRADE, MSG_CREATE_FR_UPGRADE, MSG_CREATE_MONEY_UPGRADE, MSG_CREATE_NOTHING_UPGRADE, MSG_MAX};

class CBaseMessage
{
private:
	msgID	m_msgID;

public:
	CBaseMessage(msgID messID)
	{
		m_msgID = messID;
	}

	virtual ~CBaseMessage(void) {}

	msgID GetMsgID(void) {return m_msgID;}
};

// Declare message classes here
//////////////////////////////////

// Create pistol bullet message
class CCreatePlayerBulletMessage : public CBaseMessage
{
private:
	CBase* m_pBase;
	int m_nType;
public:
	CCreatePlayerBulletMessage(CBase* pBase, int nType);
	~CCreatePlayerBulletMessage(void);

	CBase* GetBase() { return m_pBase; }
	int GetType() { return m_nType; }
};

// Destroy pistol bullet message
class CDestroyPlayerBulletMessage : public CBaseMessage
{
private:
	CPistolBullet* m_pBullet;
public:
	CDestroyPlayerBulletMessage(CPistolBullet* pCB);
	~CDestroyPlayerBulletMessage(void);

	CPistolBullet* GetBullet() { return m_pBullet; }
};

// Create shotgun bullet
class CCreateShotgunBulletMessage : public CBaseMessage
{
private:
	CBase* m_pBase;
public:
	CCreateShotgunBulletMessage(CBase* pBase);
	~CCreateShotgunBulletMessage(void);

	CBase* GetBase() { return m_pBase; }
};

// Destroy shotgun bullet
class CDestroyShotgunBulletMessage : public CBaseMessage
{
private:
	CShotgunBullet* m_pBullet;
public:
	CDestroyShotgunBulletMessage(CShotgunBullet* pCB);
	~CDestroyShotgunBulletMessage(void);

	CShotgunBullet* GetBullet() { return m_pBullet; }
};

// Create rocket bullet
class CCreateRocketBulletMessage : public CBaseMessage
{
private:
	CBase* m_pBase;
public:
	CCreateRocketBulletMessage(CBase* pBase);
	~CCreateRocketBulletMessage(void);

	CBase* GetBase() { return m_pBase; }
};

// Destroy rocket bullet
class CDestroyRocketBulletMessage : public CBaseMessage
{
private:
	CRocketLauncherBullet* m_pBullet;
public:
	CDestroyRocketBulletMessage(CRocketLauncherBullet* pCB);
	~CDestroyRocketBulletMessage(void);

	CRocketLauncherBullet* GetBullet() { return m_pBullet; }
};

// Create exception grenade
class CCreateExGrenadeMessage : public CBaseMessage
{
private:
	CBase* m_pBase;
public:
	CCreateExGrenadeMessage(CBase* pBase);
	~CCreateExGrenadeMessage(void);

	CBase* GetBase() { return m_pBase; }
};

// Create firewall grenade
class CCreateFwGrenadeMessage : public CBaseMessage
{
private:
	CBase* m_pBase;
public:
	CCreateFwGrenadeMessage(CBase* pBase);
	~CCreateFwGrenadeMessage(void);

	CBase* GetBase() { return m_pBase; }
};

// Destroy grenade
class CDestroyGrenadeMessage : public CBaseMessage
{
private:
	CGrenade* m_pGrenade;
public:
	CDestroyGrenadeMessage(CGrenade* pG);
	~CDestroyGrenadeMessage(void);

	CGrenade* GetGrenade() { return m_pGrenade; }
};

// Create turret message
class CCreateTurretMesssage : public CBaseMessage
{
private:
	float m_fPosX, m_fPosY;
public:
	CCreateTurretMesssage(float fPosX, float fPosY);
	~CCreateTurretMesssage(void);

	float GetPosX() { return m_fPosX; }
	float GetPosY() { return m_fPosY; }
};

// Destroy turret message
class CDestroyTurretMessage : public CBaseMessage
{
private:
	CTurret* m_pTurret;
public:
	CDestroyTurretMessage(CTurret* pCT);
	~CDestroyTurretMessage(void);

	CTurret* GetTurret() { return m_pTurret; }
};

// Create spider message
class CCreateSpiderMessage : public CBaseMessage
{
private:
	float m_fPosX, m_fPosY;
public:
	CCreateSpiderMessage(float fPosX, float fPosY);
	~CCreateSpiderMessage(void);

	float GetPosX() { return m_fPosX; }
	float GetPosY() { return m_fPosY; }
};

// Destroy spider message
class CDestroySpiderMessage : public CBaseMessage
{
private:
	CSpider* m_pSpider;
public:
	CDestroySpiderMessage(CSpider* pSpider);
	~CDestroySpiderMessage(void);

	CSpider* GetSpider() { return m_pSpider; }
};

// Create pistol drop message
class CCreatePistolDropMessage : public CBaseMessage
{
private:
	CBase* m_pBase; // Pointer to object that made the drop
public:
	CCreatePistolDropMessage(CBase* pBase);
	~CCreatePistolDropMessage(void);

	CBase* GetBase() { return m_pBase; }
};

// Create shotgun drop message
class CCreateShotgunDropMessage : public CBaseMessage
{
private:
	CBase* m_pBase; // Pointer to object that made the drop
public:
	CCreateShotgunDropMessage(CBase* pBase);
	~CCreateShotgunDropMessage(void);

	CBase* GetBase() { return m_pBase; }
};

// Create rocket drop message
class CCreateRocketDropMessage : public CBaseMessage
{
private:
	CBase* m_pBase;
public:
	CCreateRocketDropMessage(CBase* pBase);
	~CCreateRocketDropMessage(void);

	CBase* GetBase() { return m_pBase; }
};

// Create health drop message
class CCreateHealthDropMessage : public CBaseMessage
{
private:
	CBase* m_pBase;
public:
	CCreateHealthDropMessage(CBase* pBase);
	~CCreateHealthDropMessage(void);

	CBase* GetBase() { return m_pBase; }

};

// Create exception grenade drop message
class CCreateExGrenadeDropMessage : public CBaseMessage
{
private:
	CBase* m_pBase;
public:
	CCreateExGrenadeDropMessage(CBase* pBase);
	~CCreateExGrenadeDropMessage(void);

	CBase* GetBase() { return m_pBase; }
};
class CCreateFwGrenadeDropMessage : public CBaseMessage
{
private:
	CBase* m_pBase;
public:
	CCreateFwGrenadeDropMessage(CBase* pBase);
	~CCreateFwGrenadeDropMessage(void);

	CBase* GetBase() { return m_pBase; }
};
// Destroy drop message
class CDestroyDropMessage : public CBaseMessage
{
private:
	CDrop* m_pDrop;
public:
	CDestroyDropMessage(CDrop* pDrop);
	~CDestroyDropMessage(void);

	CDrop* GetDrop() { return m_pDrop; }
};

// Destroy firewall message
class CDestroyFirewallMessage : public CBaseMessage
{
private:
	Firewall* m_pFire;
public:
	CDestroyFirewallMessage(Firewall* pFire);
	~CDestroyFirewallMessage(void);

	Firewall* GetFirewall() { return m_pFire; }
};

// Create speed upgrade message
class CCreateSpeedUpgradeMessage : public CBaseMessage
{
private:
	CBase* m_pBase;
public:
	CCreateSpeedUpgradeMessage(CBase* pBase);
	~CCreateSpeedUpgradeMessage(void);

	CBase* GetBase() { return m_pBase; }
};

// Create fire rate upgrade message
class CCreateFRUpgradeMessage : public CBaseMessage
{
private:
	CBase* m_pBase;
public:
	CCreateFRUpgradeMessage(CBase* pBase);
	~CCreateFRUpgradeMessage(void);

	CBase* GetBase() { return m_pBase; }
};
class CCreateMoneyUpgradeMessage : public CBaseMessage
{
private:
	CBase* m_pBase;
public:
	CCreateMoneyUpgradeMessage(CBase* pBase);
	~CCreateMoneyUpgradeMessage(void);

	CBase* GetBase() { return m_pBase; }
};
class CCreateNothingUpgradeMessage : public CBaseMessage
{
private:
	CBase* m_pBase;
public:
	CCreateNothingUpgradeMessage(CBase* pBase);
	~CCreateNothingUpgradeMessage(void);

	CBase* GetBase() { return m_pBase; }
};